<template>
    <div class="worksearch">
        <div class="worksearch-title">
            <div style="font-size: 14px;display: flex;align-items: center;margin-right: 10px;">
                精确查找
            </div>
            <div style="display: flex;">
                <el-select v-model="searchtitle" placeholder="请选择" style="margin-right: 10px;width: 164px;">
                    <el-option label="住户姓名" value="name" />
                    <el-option label="手机号码" value="phone" />
                    <el-option label="证件号码" value="idcard" />
                </el-select>
                <el-input type="text" v-model="searchStr" placeholder="请输入" style="width: 264px;" />
            </div>
        </div>
        <div>

        </div>
        <div>
            <el-button type="primary" @click="enterSerch">查询</el-button>
            <el-button @click="overBack">重置</el-button>
        </div>
    </div>
</template>

<script setup lang="ts">
import { useHomeStore } from '@/stores/HomeStore';
import { storeToRefs } from 'pinia';
const homeStore = useHomeStore();
const { searchtitle, searchStr } = storeToRefs(homeStore);
const { getworktable } = homeStore;
const enterSerch = () => {
    getworktable()
}
const overBack = () => {
    searchtitle.value = 'name';
    searchStr.value = '';
    getworktable()
}
</script>

<style scoped>
@import url('@/assets/Home/Home.css');
</style>